package com.ygqh.baby.service.wechat.model;

import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;
import com.ygqh.baby.service.wechat.model.Action.ActionType;

public class UserActionReport {

	/**
	 * 采样日期，格式：yyyy-MM-dd
	 */
	@JSONField(name = "date", format = "yyyy-MM-dd")
	private Date date;
	
	/**
	 * 小时，当time_granularity=HOURLY 时有值，返回格式HH
	 */
	@JSONField(name = "hour")
	private Integer hour;
	
	/**
	 * 行为发生的域名，当aggregation=DOMAIN 时有值
	 */
	@JSONField(name = "domain")
	private String domain;
	
	/**
	 * 预定义的行为类型，当aggregation=ACTION_TYPE 时有值，参考附录中的action_type
	 */
	@JSONField(name = "action_type")
	private ActionType actionType;
	
	/**
	 * 自定义行为类型，当aggregation=ACTION_TYPE 时有值
	 */
	@JSONField(name = "custom_action")
	private String customAction;
	
	/**
	 * 原始上报行为数
	 */
	@JSONField(name = "raw_action_count")
	private Integer rawActionCount;
	
	/**
	 * 可识别的行为数
	 */
	@JSONField(name = "identified_action_count")
	private Integer identifiedActionCount;
	
	/**
	 * 可识别的独立用户数，当没有指定aggregation 时，有值
	 */
	@JSONField(name = "identified_user_count")
	private Integer identifiedUserCount;
	
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Integer getHour() {
		return hour;
	}

	public void setHour(Integer hour) {
		this.hour = hour;
	}

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	public ActionType getActionType() {
		return actionType;
	}

	public void setActionType(ActionType actionType) {
		this.actionType = actionType;
	}

	public String getCustomAction() {
		return customAction;
	}

	public void setCustomAction(String customAction) {
		this.customAction = customAction;
	}

	public Integer getRawActionCount() {
		return rawActionCount;
	}

	public void setRawActionCount(Integer rawActionCount) {
		this.rawActionCount = rawActionCount;
	}

	public Integer getIdentifiedActionCount() {
		return identifiedActionCount;
	}

	public void setIdentifiedActionCount(Integer identifiedActionCount) {
		this.identifiedActionCount = identifiedActionCount;
	}

	public Integer getIdentifiedUserCount() {
		return identifiedUserCount;
	}

	public void setIdentifiedUserCount(Integer identifiedUserCount) {
		this.identifiedUserCount = identifiedUserCount;
	}

	@Override
	public String toString() {
		return "UserActionSetReportsGetResponse [date=" + date + ", hour=" + hour + ", domain=" + domain + ", actionType=" + actionType + ", customAction="
				+ customAction + ", rawActionCount=" + rawActionCount + ", identifiedActionCount=" + identifiedActionCount + ", identifiedUserCount="
				+ identifiedUserCount + "]";
	}

	public static enum TimeGranularity {
		DAILY, HOURLY;
	}

	public static enum Aggregation {
		DOMAIN, ACTION_TYPE;
	}

}
